#include "startgame.h"
#include "ui_startgame.h"
#include"mainscence.h"
#include<QSound>
#include<QMessageBox>

QSound* sound = new QSound(MENUMUSIC_PATH);


startGame::startGame(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::startGame)
{

    ui->setupUi(this);

/*******************/

    sound->setLoops(QSound::Infinite);
    sound->play();

/*******************/

}

startGame::~startGame()
{
    delete ui;
}

void startGame::on_pushButton_clicked()
{
    this->hide();
    QMessageBox::about(this,"游戏规则","1、用鼠标拖动战机移动 2、用wasd控制飞机移动");
    sound->stop();
    emit nextPage();
}

void startGame::last()
{
    this->show();
}
